package com.kancy.demo.streamplus.channel;

import com.kancy.streamplus.channel.Period;
import com.kancy.streamplus.channel.PeriodChannel;
import org.springframework.cloud.stream.annotation.Input;
import org.springframework.cloud.stream.annotation.Output;
import org.springframework.cloud.stream.binder.PollableMessageSource;
import org.springframework.messaging.MessageChannel;

/**
 * FiveSecondsChannel
 *
 * @author kancy
* @date 2020/3/22 19:38
*/
@Period("PT5S")
public interface FiveSecondsChannel extends PeriodChannel {
    String OUTPUT = "fiveSecondsOutput";
    String INPUT = "fiveSecondsInput";
    long PERIOD = 5 * 1000L;

    @Override
    @Output(OUTPUT)
    MessageChannel output();

    @Input(INPUT)
    PollableMessageSource input();

}
